/**
 * SLF4jLogContextInitializer
 *
 * @author Chris Pratt
 *
 * 7/29/2012
 */
package com.anodyzed.onyx.log.slf4j;

import com.anodyzed.onyx.log.LogBuilder;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

public class SLF4jLogContextInitializer implements ServletContextListener {

  /**
   * The Servlet Context is being constructed, initialize the LogBuilder to use 
   * this Factory 
   *
   * @param event The Servlet Context Event
   */
  @Override
  public void contextInitialized (ServletContextEvent event) {
    LogBuilder.setLogFactory(new SLF4jLogFactory());
  } //contextInitialized

  /**
   * The Servlet Context is being destroyed, clean up
   *
   * @param event The Servlet Context Event
   */
  @Override
  public void contextDestroyed (ServletContextEvent event) {
  } //contextDestroyed
  
} //*SLF4jLogContextInitializer
